1. Field of the Invention
This invention relates to microprocessors and, more particularly, mechanisms for the monitoring of microprocessor processes and process performance data gathering during program execution.
2. Description of the Related Art
For many years, software engineers and processor architects have recognized a need for the ability to measure the behavior of software during execution. A number of profiling mechanisms exist that are capable of measuring behaviors such as, for example, the frequency and duration of function calls. A profiler or program analysis tool may monitor a given process and provide an output stream of events, or a summary of the historical events.
There are a variety of ways to profile running software. For example, one way is to instrument the actual code that will run. Instrumenting typically refers to the insertion of monitor code into the program to be monitored. The instrumented code may output analysis data. Other types of profiling include event based profiling and statistical profiling. Some event based profilers use profiling modules that trap events such as calls, for example. Statistical profiling uses sampling by interrupting the operating system at predetermined intervals that may be based on time or on the number of times an event has occurred.
These types of conventional profilers do provide results. However, they tend to perturb the process that is being monitored by adding too much additional state to the CPU and the running process, and interrupting the process flow too frequently.